class WeeklyResult < ActiveRecord::Base
  establish_connection :weekly
  belongs_to :weekly_result_work

  ['wid', 'name', 'wtype', 'author'].each do |n|
    unless self.column_names.include?(n)
      eval "attr_reader(:#{n});def #{n};@#{n} ||= weekly_result_work.#{n};end"
    end
  end
end
